<template>
  <div>
    <span>
        <icon name="chart-pie" class="text-icon"></icon>
    </span>
    <span class="fs-xl text mx-2 mb-1 pl-3">年度负责人组件达标榜</span>
    <dv-scroll-ranking-board class="dv-scr-rank-board mt-1" :config="ranking"/>
  </div>
</template>

<script>
export default {
  data() {
    return {

    }
  },

  props: {
    ranking: {
      type: Object,
      default: () => ({})
    },
    number: {
      type: Number,
      default: 0
    }
  },
  watch: {
    ranking: { // 监听传递过来的数据的变化
      handler(newData) {
        this.ranking = newData
        console.log(this.ranking)
      },
      immediate: true,
      deep: true
    },
    number: {
        handler(newData) {
          this.number = newData
          console.log(newData)
        },
        immediate: true,
        deep: true
    }
  }
}
</script>
<style lang="scss" scoped>
.dv-scr-rank-board {
    width:100%;
    height: 400px;
}
</style>
